<?php

/**
 * Created by PhpStorm.
 * User: henry
 * Date: 2017/3/2
 * Time: 上午10:50
 */

namespace common\db;

use common\encrypt\AESCryptography;
use yii\db\Connection;

class MyConnection extends Connection
{
    public $dsn;
    public $username;
    public $password;

    public function __construct(array $config = [])
    {
        parent::__construct($config);
        $this->username = AESCryptography::decrypt($this->username, $this->dsn);
        $this->password = AESCryptography::decrypt($this->password, $this->dsn);
    }
}